<template>
	<div class="attentionAll">
		<box v-for="t in boxInfo" :key='t._id' :info='t'></box>
	</div>
</template>

<script>
	import box from './box.vue'
	export default{
		data(){
			return{
				boxInfo:[]
			}
		},
		components:{
			box
		},
		mounted() {
			this.$axios({
				url: this.ip + '/showAttention',
				method: 'post',
				data: {
					userID: this.$storage.get('user').id
				}
			}).then(res => {
				console.log(res.data.info)
				for(let i of res.data.info){
					this.$axios({
						url: this.ip + '/userPostListGet',
						method: 'post',
						data: {
							userID: i.attentionID._id
						}
					}).then(res => {
						console.log(res.data)
						this.boxInfo = res.data.info
					})
				}
			})
		}
	}
</script>

<style>
</style>
